/* eslint-disable */
// @ts-ignore
import request from '@/utils/http';

import * as API from './types';

/** 最近活动 POST /new/open/user/getLatelyActivity */
export async function openApiNewOpenUserGetLatelyActivityUsingPost({
  options,
}: {
  options?: { [key: string]: unknown };
}) {
  return request<API.RListLatelyTaskInfoVo>(
    '/new/open/user/getLatelyActivity',
    {
      method: 'POST',
      ...(options || {}),
    }
  );
}

/** 获取当前登录人信息 POST /new/open/user/getLoginUser */
export async function openApiNewOpenUserGetLoginUserUsingPost({
  options,
}: {
  options?: { [key: string]: unknown };
}) {
  return request<API.RNewUserVo>('/new/open/user/getLoginUser', {
    method: 'POST',
    ...(options || {}),
  });
}

/** 刷新认证状态 POST /new/open/user/refreshAuthStatus */
export async function openApiNewOpenUserRefreshAuthStatusUsingPost({
  options,
}: {
  options?: { [key: string]: unknown };
}) {
  return request<API.RBoolean>('/new/open/user/refreshAuthStatus', {
    method: 'POST',
    ...(options || {}),
  });
}

/** 注册-小程序 POST /new/open/user/registerToXcx */
export async function openApiNewOpenUserRegisterToXcxUsingPost({
  body,
  options,
}: {
  body: API.NewUserBoNewOpenUserRegisterToXcx;
  options?: { [key: string]: unknown };
}) {
  return request<API.RNewUserVo>('/new/open/user/registerToXcx', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 服务统计 POST /new/open/user/statisticsServe */
export async function openApiNewOpenUserStatisticsServeUsingPost({
  options,
}: {
  options?: { [key: string]: unknown };
}) {
  return request<API.RNewUserServeStatisticsVo>(
    '/new/open/user/statisticsServe',
    {
      method: 'POST',
      ...(options || {}),
    }
  );
}

/** 修改基本信息 POST /new/open/user/updateData */
export async function openApiNewOpenUserUpdateDataUsingPost({
  body,
  options,
}: {
  body: API.NewUserBoNewOpenUserUpdateData;
  options?: { [key: string]: unknown };
}) {
  return request<API.RNewUserVo>('/new/open/user/updateData', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
